<!DOCTYPE html>
<html>
{include file="public/head"}

<body>
    {include file="contest/contest-nav"}
    <br/>
    
    </div>
    <div class="layui-row">
        <div class="layui-col-lg8">
            <div class="fly-panel contest-discuss-8">
                <div style="text-align: center;">
                    <form class="layui-form">
                        <div class="layui-inline status-input-comb" style="text-align: left;">
                            <select name="num" lay-verify="">
                                <option value='-2'>所有提问-(all)</option>
                                <option value="-1" {if condition="$select_num==-1"}selected{/if}>public 通用提问</option>
                                {foreach $problemlist as $k=>$v}
                                <option value="{$v.num}" {if condition="$select_num==$k"}selected{/if}>{$v.no} - {$v.alias?$v.alias:$v.problem_title}</option>
                                {/foreach}
                            </select>
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn">检索</button>
                        </div>
                    </form>
                </div>
                <div>
                    {if condition="count($discusslist)==0"}
                        <br /><br /><br /><br />
                        <h2 style="text-align: center;">还没有人提问呢~</h2>
                        <br />
                        {else/}
                        <table class="layui-table">
                            <thead>
                                <tr class="layui-bg-black">
                                    <th>问题</th>
                                    <th>内容</th>
                                    <th>提问人</th>
                                </tr>

                            </thead>
                        {foreach $discusslist as $v}
                        
                        <tbody>
                            <tr>
                                <td>
                                    {if condition="$v.pre==-2"}<span style="color: #FF0000;">通知-管理员</span>
                                    {elseif condition="$v.num==-1" /}
                                    <span style='color: orange;'>public 通用提问</span>
                                    {else /}
                                    <a style="color: #01AAED;" href="{:url('web/contest/problem',['cid'=>$cid,'num'=>$problemlist[$v.num]['no']])}">{$problemlist[$v.num]['alias']}</a>
                                    {/if}
                                    
                                    </td>
                                <td><span>{$v.summary}</span><a href="{:url('web/Contestdiscuss/show',['id'=>$v.id,'cid'=>$cid])}" class="layui-badge layui-bg-blue" style="float: right;">点击查看</a></td>
                                <td>{$v.user_id}</td>
                            </tr>
                        </tbody>
                        {/foreach}
                    </table>
                    
                    {$page}
                        {/if}
                    
                </div>
                
            </div>
        </div>
        <div class="layui-col-lg4">
            <div class="fly-panel contest-discuss-4">
                <div style="text-align: center;">
                    <a class="layui-btn layui-inline" href="{:url('web/Contestdiscuss/post_discuss',['cid'=> $cid])}">发起提问</a>
                </div>
            </div>
        </div>
    </div>
    
    

    </div>
    
     {include file="public/foot"}
	 {include file="contest/post-notice"}
</body>
<script>
    layui.use(['jquery','form','element'],function(){
        var form=layui.form;
        var $=layui.jquery;
        var element=layui.element;
        form.render();      
    });
</script>
</html>